package com.arron.jvm.ref;

/**
 * @Classname StrongRefDemo
 * @Date 2020/8/23 23:23
 * @Created by 刘
 */
public class StrongRefDemo {

    //强引用
    public static void main(String[] args) {

        Object obj1 = new Object();
        Object obj2 = obj1;
        obj1 = null;
        //主动进行gc
        System.gc();
        System.out.println(obj2);
    }


}
